#ifndef FILEIDHANDLER_H
#define FILEIDHANDLER_H

#include <iostream>
#include "List.h"
#include "Data.h"

#define RES_ERROR -1

class FileIdHandler
{
	protected:
		List* lista;
		int max;
		
		FileIdHandler();
	public:
		
		~FileIdHandler();

		static FileIdHandler* GetInstance();

		int getHandler(char *filename);
		void addHandler(char *filename);
};


class IdHandler : public Data
{
	protected:
		char* filename;
		int handler;

	public:
		IdHandler();
		~IdHandler();

		void getFilename(char* name);
		void setFilename(char* name);

		void setIdHandler(int h);
		int getIdHandler();

		bool equal(Data* data);
		void copy(Data** data);
		Data* allocate();
		void print();
};

#endif



